package com.joysuch.wwyt.monitoringcenter.enums;

/**
 * @Author ZhangDong
 * @Date 2020/9/14 16:54
 */
public enum AlarmTypes {

    ONE_KEY_ALARM("oneKeyAlarm:alarm", "一键报警"),
    STAY_ALARM("stayAlarm", "滞留报警"),
    OVER_BOUNDARY_ALARM("overBoundaryAlarm", "越界报警"),
    OVER_NUM("overNum", "超员报警"),
    LACK_NUM("lackNum", "缺员报警"),
    STILL_ALARM("stillAlarm", "静止报警");

    String type;
    String name;

    AlarmTypes(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static String getName(String type) {
        AlarmTypes[] values = AlarmTypes.values();
        for (AlarmTypes value : values) {
            if (value.getType().equals(type)) {
                return value.getName();
            }
        }
        return null;
    }

}
